/*
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License, or
 *  (at your option) any later version.
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU General Public License for more details.
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 */

package br.ufrj.dcc.comp2.projeto.modelos;

/**
 * Classe basica representando um vetor em 2D.
 * @author Bruno
 *
 */
public class Vetor2D {
	/* Java não tem operator overloading? Oh my... */
	protected float X;
	protected float Y;
	
	public Vetor2D() {
		X = 0;
		Y = 0;
	}
	
	public Vetor2D(float X, float Y) {
		this.X = X;
		this.Y = Y;
	}
	
	public float getX() {
		return this.X;
	}
	
	public float getY() {
		return this.Y;
	}
	
	public void setX(float X) {
		this.X = X;
	}
	
	public void setY(float Y) {
		this.Y = Y;
	}
	
	public void addX(float X) {
		this.X += X;
	}
	
	public void addY(float Y) {
		this.Y += Y;
	}
	
	public void clear() {
		this.X = 0;
		this.Y = 0;
	}
}
